package org.celery.modules.productSource.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.celery.modules.productSource.entity.*;
import org.celery.modules.ticket.entity.Ticket;

import org.springblade.core.mp.support.Query;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

public interface IProductSourceService extends IService<ProductSource> {

    /**
     * 同步记录接口
     */

    /**
     * 获取当前商品的分页条记录
     */
    Future<HashMap<String, Object>> getProductSourceServiceByPage(AlibabaProductGetListParam alibabaProductGetListParam, Long shopIdStatic);

    /**
     * 获取自身的产品
     */
    AlibabaProductGetResult getProductSourceServiceByPageSelf(AlibabaProductGetParam alibabaProductGetParam);

    /**
     * 获取只能查询自己所有的产品，因为只能单条查询，所以通过循环的方式进行遍历
     */
    HashMap<String, Object> getCurrentProductSourceServiceByPageSelf(Ticket ticket, Query query);

    /**
     * 获取分页数据(根据商品ID列表获取商品(卖家)）
     */
    AlibabaProductGetByIdListResult productSourceServiceByPageSeller(AlibabaProductGetByIdListParam alibabaProductGetByIdListParam, Long shopIdStatic);
    /**
     * 根据商品id去搜索当前的商品
     */
    HashMap<String, Object> getCurrentProductSourceServiceByPageSelfById(String LongId);

    /**
     * 根据商品id去搜索当前的商品
     */
    HashMap<String, Object> getMyCurrentProductSourceServiceByPageSelfById(String LongId, AlibabaProductGetListParam alibabaProductGetListParam, Long  shopIdStatic);

    /**
     * 同步商品源数据
     */
    Future<Boolean> synchronizeProductSources(Long shopIdStatic) throws ExecutionException, InterruptedException;

    /**
     * 添加基础采购链接
     */
    Boolean addProductSourceUrl(Long productId);

    List<ProductSource> dataListSearch(List<Long> ids);
}
